<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //1 函数的使用
    function fn(name){
        var name = name || "zs";
        console.log(name); 
    }
    fn()
    fn(null)
    fn(undefined)
    fn(true)
    fu(111)
    fn("")
    //2 赋初值
    function name(name,sex,age = 19) {
      console.log(age);
    }
    name(18)
    //3 rest 参数 剩余参数
    function fn1(x,...rest) {
        console.log(rest); //[2,3,4,5]
        console.log(x); 
        console.log(arguments);

    }
    fn1(1,2,3,4,5) 
</script>
</html>